#ifndef DEVICE_LIST_H
#define DEVICE_LIST_H

#include "Device.h"
#include <pthread.h>

class DeviceListNode {
public:
	DeviceListNode();
	virtual ~DeviceListNode();

	Device *device;
	DeviceListNode *next;

protected:

private:

};

class DeviceList {
public:
	DeviceList();
	virtual ~DeviceList();
	
	void addDevice(Device *device);
	bool contains(Device *device);
	void removeAll();
	void lockList();
	void unlockList();
protected:

private:
	DeviceListNode *head;
	pthread_mutex_t listMutex;
	int size;
};
#endif
